package com.elcom.config;

import java.io.File;
import java.io.IOException;
import org.jconfig.ConfigurationManagerException;

/**
 * Interface used for configution
 * @author GiangLT
 */
public interface IConfig {

    /** If the config file does not exist in the specified folder, this method will create a default one.
     *  Then, the config system will be loaded and will be set a FileListener
     * @param configFolder The folder where the config file is stored
     * @param configFileName The name of the jConfig file
     * @throws IOException
     * @throws ConfigurationManagerException
     */
    public void reloadConfig(String configFolder, String configFileName) throws IOException, ConfigurationManagerException;

    /**Creatse a default jConfig file
     *
     * @param fout The output file
     * @throws IOException Thrown when the file cannot be created
     */
    public void createDefaultConfigFile(File fout) throws IOException;
}
